@import 'hover_transitions';

*,
*:before,
*:after {
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
        '微软雅黑', Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.15 !important;
    color: #303133 !important;
    background-color: #fff !important;
}

a {
    color: mix(#fff, $--color-primary, 20%);
    text-decoration: none;

    &:focus,
    &:hover {
        color: $--color-primary;
        text-decoration: underline;
    }
}

img {
    vertical-align: middle;
}

/* Utils
------------------------------ */
.clearfix:before,
.clearfix:after {
    content: ' ';
    display: table;
}

.clearfix:after {
    clear: both;
}

/* Animation
------------------------------ */
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.5s;
}

.fade-enter,
.fade-leave-to {
    opacity: 0;
}

/* Reset element-ui
------------------------------ */
.site-wrapper {
    .el-pagination {
        margin-top: 15px;
        text-align: right;

        .el-pagination__sizes {
            float: right;
            margin-right: 160px;
        }

        .el-pagination__jump {
            position: absolute;
            margin-left: 140px;
            float: right;
        }

        .el-pagination__total {
            float: left;
        }
    }
}

/* Layout
------------------------------ */
.site-wrapper {
    position: relative;
    min-width: 1180px;
}

/* Sidebar fold
------------------------------ */
.site-sidebar--fold {
    // .site-navbar__header,
    // .site-navbar__brand,
    .site-sidebar,
    .site-sidebar__inner,
    .el-menu.site-sidebar__menu {
        width: 64px;
    }

    .site-navbar__body,
    .site-content__wrapper {
        margin-left: 64px;
    }

    // .site-navbar__brand {
    //   &-lg {
    //     display: none;
    //   }
    //   &-mini {
    //     display: inline-block;
    //   }
    // }
    .site-sidebar,
    .site-sidebar__inner {
        overflow: initial;
    }

    .site-sidebar__menu-icon {
        margin-right: 0;
        font-size: 20px;
    }

    .site-content--tabs > .el-tabs > .el-tabs__header {
        left: 64px;
    }
}

// animation
.site-navbar__header,
.site-navbar__brand,
.site-navbar__body,
.site-sidebar,
.site-sidebar__inner,
.site-sidebar__menu.el-menu,
.site-sidebar__menu-icon,
.site-content__wrapper,
.site-content--tabs > .el-tabs .el-tabs__header {
    transition: inline-block 0.3s, left 0.3s, width 0.3s, margin-left 0.3s, font-size 0.3s;
}

/* Navbar
------------------------------ */
.site-navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
    height: 80px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    background: linear-gradient(90deg, #4189dc 0%, #155aab 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;

    &--inverse {
        .site-navbar__body {
            background-color: transparent;
        }

        .el-menu {
            > .el-menu-item,
            > .el-submenu > .el-submenu__title {
                color: #fff;

                &:focus,
                &:hover {
                    color: #fff;
                    background-color: mix(#000, $navbar--background-color, 15%);
                }
            }

            > .el-menu-item.is-active,
            > .el-submenu.is-active > .el-submenu__title {
                border-bottom-color: mix(#fff, $navbar--background-color, 85%);
            }

            .el-menu-item i,
            .el-submenu__title i,
            .el-dropdown {
                color: #fff;
            }
        }

        .el-menu--popup-bottom-start {
            background-color: $navbar--background-color;
        }
    }

    &__header {
        position: relative;
        float: left;
        width: 400px;
        height: 50px;
        overflow: hidden;
    }

    &__brand {
        display: table-cell;
        vertical-align: middle;
        width: 400px;
        height: 50px;
        margin: 0;
        line-height: 50px;
        font-size: 20px;
        text-align: left;
        text-transform: uppercase;
        white-space: nowrap;
        color: #fff;
        padding-left: 20px;

        &-lg,
        &-mini {
            margin: 0 5px;
            color: #fff;

            &:focus,
            &:hover {
                color: #fff;
                text-decoration: none;
            }
        }

        &-mini {
            display: none;
        }
    }

    &__switch {
        font-size: 16px;
        color: #555c6e;
        border-bottom: none !important;
    }

    &__avatar {
        border-bottom: none !important;

        * {
            vertical-align: inherit;
        }

        &:hover {
            background-color: #163366 !important;
        }

        .el-dropdown-link {
            > img {
                width: 36px;
                height: auto;
                margin-right: 5px;
                border-radius: 100%;
                vertical-align: middle;
            }
        }
    }

    &__body {
        position: relative;
        margin-left: 252px;
        padding-right: 15px;
        // background-color: #fff;
    }

    &__menu {
        float: left;
        background-color: transparent;
        border-bottom: 0;

        &--right {
            float: right;
        }

        a:focus,
        a:hover {
            text-decoration: none;
        }

        .el-menu-item,
        .el-submenu > .el-submenu__title {
            height: 50px;
            line-height: 50px;
            margin-left: -30px;
        }

        .el-submenu > .el-menu {
            top: 55px;
        }

        .el-badge {
            display: inline;
            z-index: 2;

            &__content {
                line-height: 16px;
            }
        }
    }
}

/* Sidebar
------------------------------ */
.site-sidebar {
    position: fixed;
    top: 80px;
    // top: 0px;
    left: 0;
    bottom: 0;
    z-index: 1020;
    width: 252px;
    overflow: hidden;

    &--dark,
    &--dark-popper {
        background-color: $sidebar--background-color-dark;

        .site-sidebar__menu.el-menu,
        > .el-menu--popup {
            background-color: $sidebar--background-color-dark;

            .el-menu-item,
            .el-submenu > .el-submenu__title {
                // color: $sidebar--color-text-dark;
                font-size: 16px;
                font-family: Microsoft YaHei;
                font-weight: bold;
                color: rgba(255, 255, 255, 0.6);

                &:focus {
                    background-color: #163366;
                }

                &:hover {
                    background: #122952;
                    // background-position: 100px 120px;
                    // -webkit-animation-name: hvr-wobble-horizontal;
                    // animation-name: hvr-wobble-horizontal;
                    // -webkit-animation-duration: 1s;
                    // animation-duration: 1s;
                    // -webkit-animation-timing-function: ease-in-out;
                    // animation-timing-function: ease-in-out;
                    // -webkit-animation-iteration-count: 1;
                    // animation-iteration-count: 1;
                    // animation: animatedBackground 1s linear infinite;
                }
            }

            .el-submenu > .el-submenu__title {
                font-size: 16px;
                font-weight: bold;
                font-family: 'microsoft yahei';
                color: #3377ff;
            }

            .el-menu,
            .el-submenu.is-opened {
                // background-color: mix(#000, $sidebar--background-color-dark, 15%);
                background-color: #163366;
            }

            //     .el-menu-item.is-active,
            //     .el-submenu.is-active > .el-submenu__title {
            //       // color: mix(#fff, $sidebar--color-text-dark, 80%);
            //       color: #fff;
            // background-color: #122952;
            //     }

            .el-menu-item.is-active {
                color: #fff;
                background-color: #122952;
            }

            .el-icon-arrow-down:before {
                content: '\E603';
            }
        }
    }

    &__inner {
        position: relative;
        z-index: 1;
        width: 252px;
        height: 100%;
        padding-bottom: 15px;
        overflow-y: hidden;
        border-top: 1px solid #a2a6b8;
    }

    &__menu.el-menu {
        width: 252px;
        border-right: 0;
    }

    &__menu-icon {
        width: 24px;
        margin-right: 5px;
        text-align: center;
        font-size: 16px;
        color: inherit !important;
    }
}

@keyframes animatedBackground {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 100% 0;
    }
}

/* Content
------------------------------ */
.site-content {
    position: relative;
    padding: 0px;

    &__wrapper {
        position: relative;
        // padding-top: 80px;
        margin-left: 252px;
        min-height: 100%;
        background: $content--background-color;
    }

    &--tabs {
        padding: 55px 0 0;
    }

    > .el-tabs {
        > .el-tabs__header {
            position: fixed;
            top: 80px;
            left: 252px;
            right: 0;
            z-index: 930;
            padding: 0 55px 0 15px;
            box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
            background-color: #fff;

            > .el-tabs__nav-wrap {
                margin-bottom: 0;

                &:after {
                    display: none;
                }
            }
        }

        > .el-tabs__content {
            padding: 0 15px 15px;

            > .site-tabs__tools {
                position: fixed;
                top: 50px;
                right: 0;
                z-index: 931;
                height: 40px;
                padding: 0 12px;
                font-size: 16px;
                line-height: 40px;
                background-color: $content--background-color;
                cursor: pointer;

                .el-icon--right {
                    margin-left: 0;
                }
            }
        }
    }
}

// .el-table__expand-icon {
//   display: inline-block;
//   width: 14px;
//   vertical-align: middle;
//   margin-right: 5px;
// }

/* Table
------------------------------ */
.el-table {
    th {
        /*background: #eeeeee !important;*/
        background: #eaeff5 !important;
        color: #182131;
        font-weight: 400;

        .cell {
            font-size: 16px;
        }
    }

    td {
        .split-line {
            margin: 0 2px 0;
            color: #eaeaea;
        }
    }
}

/* Pagination
------------------------------ */
.el-pagination__total {
    float: left;
}

.el-pagination__sizes {
    float: left;
}

.el-pagination__sizes_text {
    float: left;
    font-weight: 400;
    color: #606266;
    margin: 0 5px 0 15px;
}

/* Dialog Header
------------------------------ */
.el-dialog__header {
    border-bottom: 2px solid #e6e6e6;
}

.el-dialog__footer {
    background: #f5f5f5;
}

/* timeline
---------------------------------------*/
.el-timeline {
    margin: 0;
    font-size: 14px;
    list-style: none;
}

.el-timeline .el-timeline-item:last-child .el-timeline-item__tail {
    display: none;
}

.el-timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.el-timeline-item__wrapper {
    position: relative;
    padding-left: 28px;
    top: -3px;
}

.el-timeline-item__tail {
    position: absolute;
    left: 4px;
    height: 100%;
    border-left: 2px solid #e4e7ed;
}

.el-timeline-item__icon {
    color: #fff;
    font-size: 13px;
}

.el-timeline-item__node {
    position: absolute;
    background-color: #e4e7ed;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.el-timeline-item__node--normal {
    left: -1px;
    width: 12px;
    height: 12px;
}

.el-timeline-item__node--large {
    left: -2px;
    width: 14px;
    height: 14px;
}

.el-timeline-item__node--primary {
    background-color: #409eff;
}

.el-timeline-item__node--success {
    background-color: #67c23a;
}

.el-timeline-item__node--warning {
    background-color: #e6a23c;
}

.el-timeline-item__node--danger {
    background-color: #f56c6c;
}

.el-timeline-item__node--info {
    background-color: #909399;
}

.el-timeline-item__dot {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
}

.el-timeline-item__content {
    color: #303133;
}

.el-timeline-item__timestamp {
    color: #909399;
    line-height: 1;
    font-size: 13px;
}

.el-timeline-item__timestamp.is-top {
    margin-bottom: 8px;
    padding-top: 4px;
}

.el-timeline-item__timestamp.is-bottom {
    margin-top: 8px;
}

/*image-------------------------------------------*/
.el-image__error,
.el-image__inner,
.el-image__placeholder {
    width: 100%;
    height: 100%;
}

.el-image {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.el-image__inner {
    vertical-align: top;
}

.el-image__inner--center {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
}

.el-image__error,
.el-image__placeholder {
    background: #f5f7fa;
}

.el-image__error {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    color: #c0c4cc;
    vertical-align: middle;
}

.el-image__preview {
    cursor: pointer;
}

.el-image-viewer__wrapper {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.el-image-viewer__btn {
    position: absolute;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0.8;
    cursor: pointer;
    box-sizing: border-box;
    user-select: none;
}

.el-image-viewer__close {
    top: 40px;
    right: 40px;
    width: 40px;
    height: 40px;
    font-size: 40px;
}

.el-image-viewer__canvas {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.el-image-viewer__actions {
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    width: 282px;
    height: 44px;
    padding: 0 23px;
    background-color: #606266;
    border-color: #fff;
    border-radius: 22px;
}

.el-image-viewer__actions__inner {
    width: 100%;
    height: 100%;
    text-align: justify;
    cursor: default;
    font-size: 23px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.el-image-viewer__prev {
    left: 40px;
}

.el-image-viewer__next,
.el-image-viewer__prev {
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    font-size: 24px;
    color: #fff;
    background-color: #606266;
    border-color: #fff;
}

.el-image-viewer__next {
    right: 40px;
    text-indent: 2px;
}

.el-image-viewer__mask {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0.5;
    background: #000;
}

/*divider-------------------------------------------*/
.el-divider--vertical {
    display: inline-block;
    width: 1px;
    height: 1em;
    margin: 0 10px;
    vertical-align: middle;
    position: relative;
}

.el-divider--horizontal {
    display: block;
    height: 1px;
    width: 100%;
    margin: 2px 0 10px;
}

.el-divider {
    background-color: #dcdfe6;
    position: relative;
}

/*上传头像样式*/
.avatar-uploader .el-upload {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.avatar-uploader .el-upload:hover {
    border-color: #409eff;
}

.avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 178px;
    height: 178px;
    line-height: 178px;
    text-align: center;
}

.avatar {
    width: 178px;
    height: 178px;
    display: block;
}

.el-message-box__message {
    p {
        word-wrap: break-word;
        word-break: normal;
    }
}
